
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
	<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">       
	<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
	<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
        <title>Detalle de Venta</title>
    </head>
    <body class="container">
        <div class="form-horizontal">
            <div class="form-group"> 
                <label class="col-md-2 control-label">Numero de boleta</label>
                <p class="form-control-static">${boleta.codBoleta}</p>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">Nombre Usuario</label> 
                <p class="form-control-static">${boleta.nombreUsuario}</p>
            </div>
            <div class="form-group">               
                <label class="col-md-2 control-label">Rut Usuario</label>
                <p class="form-control-static">${boleta.rutUsuario}</p>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">Fecha</label>
                <p class="form-control-static">${boleta.fecha}</p> 
            </div>
            
            <div id="salida">
                <table class="table table-condensed table-bordered table-hover">

                    <thead>
                    <th>Codigo Producto</th>
                    <th>Nombre</th>
                    <th>Cantidad</th>
                    <th>Precio Unitario</th>
                    <th>Sub Total</th>
                    </thead>

                    <tbody>
                        <c:forEach var="fila" items="${lista}">
                            <tr>
                                <td><c:out value="${fila.codProducto}" /></td>
                                <td><c:out value="${fila.nombre}" /></td>
                                <td><c:out value="${fila.cantidad}" /></td>
                                <td><c:out value="${fila.precio}" /></td>
                                <td><c:out value="${fila.subTotal}" /></td>
                            </tr>
                        </c:forEach>
                    </tbody>


                </table>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">Descuentos</label>  
                <p class="form-control-static">${boleta.descuentos}</p>
            </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">Total Venta</label>
                    <p class="form-control-static">${boleta.totalVenta}</p>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">Estado</label> 
                    <p class="form-control-static">${boleta.strEstado}</p>
                </div>    
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <button id="cerrar" class="btn btn-success">Cerrar</button>
                    </div>
                </div>
        </div>    
                <script>
                    $('#cerrar').click(function(){
                       window.close() 
                    });
                </script>   
    </body>
</html>